﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using FileMonitor.Configuration.Prototype;
namespace MonitorProvider.Prototype
{
    //public enum ProcessType
    //{
    //    FTP,
    //    ExChangeDB
    //}
    public class ProcessFactory
    {
        public static IProcessFile CreateProcess(ProcessType processType)
        {
            if (processType.ToString() == "FTP")
            {
                object obj = Activator.CreateInstance(typeof(DespatchFTPProcess));
                IProcessFile ftpPro = obj as IProcessFile;
                 return ftpPro;
               
            }
            else if (processType.ToString() == "ExChangeDB")
            {
                object obj = Activator.CreateInstance(typeof(SaveDBProcess));
                IProcessFile dbPro = obj as IProcessFile;
                return dbPro;
            }
            else
            {
                return null;
            }
        }
    }
}
